package com.winterchen.model.error;

/**
 * @className ErrorInfo
 * @Description 异常返回类
 * @Author Administrator
 * @Date 2018/9/12 0012 16:54
 * @Version 1.0
 **/
public class ErrorInfo {

    private Integer code;
    private String msg;
    private String url;
    private Object data;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ErrorInfo() {

    }

    public ErrorInfo(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ErrorInfo(Integer code, String msg,String url,Object data) {
        this.code = code;
        this.msg = msg;
        this.url = url;
        this.data = data;
    }

    public static ErrorInfo err(String msg) {
        return new ErrorInfo(500, msg);
    }

    public static ErrorInfo err(String msg,String url,Object data) {
        return new ErrorInfo(500, msg, url, data);
    }

}
